home *** CD-ROM | disk | FTP | other *** search
/ A.C.E. 2 / ACE CD 2.iso / FILES / UTILS / AMOSPRO6.DMS / in.adf / Procedures / Screen_FX / _Scroll.AMOS / _Scroll.amosSourceCode
Encoding:
AMOS Source Code  |  1992-09-29  |  4.1 KB  |  112 lines

  1. '******************************************************* 
  2. '*                                                     * 
  3. '* AMOS Professional Procedure Library                 * 
  4. '*                                                     * 
  5. '* Procedure: Credits Scroller                         * 
  6. '*                                                     * 
  7. '*    Author: Wai Hung Liu                             * 
  8. '*                                                     * 
  9. '******************************************************* 
  10.  
  11. ' ~~~~~~~~ EXAMPLE 1 ~~~~~~~~~~
  12. Screen Open 0,640,290,2,Hires : Curs Off : Hide 
  13. Screen Display 0,,28,, : Palette $0,$FFF
  14. _CREDIT_SCR[0,8,1,1,1]
  15. ' ~~~~~~~~ EXAMPLE 2 ~~~~~~~~~~
  16. Screen Open 1,20,16,2,Laced+Lowres : Screen Display 1,,22,, : Curs Off 
  17. Screen Open 0,640,290,2,Hires : Curs Off 
  18. Screen Display 0,,28,, : Palette $0,$FFF
  19. _CREDIT_SCR[0,8,2,1,2]
  20. ' ~~~~~~~~ EXAMPLE 3 ~~~~~~~~~~
  21. Screen Open 0,320,290,2,Lowres : Curs Off 
  22. Screen Display 0,,28,, : Palette $0,$FFF
  23. Get Rom Fonts 
  24. Set Font 2 : Rem >> Sets Topaz 9 font <<
  25. _CREDIT_SCR[0,7,2,1,3]
  26. End 
  27.  
  28. Procedure _CREDIT_SCR[_CRSNO,_CRSFS,_CRSSPD,_CRSSTEP,_CRSDAT]
  29.    '
  30.    ' By placing different values into _CRSFS, you can also execute a
  31.    ' primitive form of kerning. Seen in example 3 to make the text lines  
  32.    ' closer together. 
  33.    '
  34.    Screen _CRSNO
  35.    Def Scroll 1,0,0 To Screen Width,Screen Height,0,-_CRSSTEP
  36.    Restore _CRSDAT+0
  37.    '
  38.    Do 
  39.       Read _CRSTXT$
  40.       '
  41.       If _CRSTXT$="*end*"
  42.          For _CRSLOP=1 To Screen Height/_CRSSTEP
  43.             Wait _CRSSPD
  44.             Scroll 1
  45.          Next _CRSLOP
  46.          Exit 
  47.       End If 
  48.       '
  49.       If _CRSTXT$<>"*end*"
  50.          _CRSL=Text Length(_CRSTXT$)
  51.          Text Screen Width/2-_CRSL/2,Screen Height-Text Base,_CRSTXT$
  52.          For _CRSLOP=1 To(_CRSFS*2)/_CRSSTEP
  53.             Wait _CRSSPD
  54.             Scroll 1
  55.          Next _CRSLOP
  56.       End If 
  57.    Loop 
  58.    '
  59.    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  60.    ' ENTER ALL YOUR TEXT AS DATA STATEMENTS BELOW.
  61.    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  62.    1 Data "Welcome to...","","Credit Scroller!","By W.H.Liu",""
  63.    Data "This is just an example of what can be achieved with AMOS"
  64.    Data "Don't forget you can change the font as well!",""
  65.    Data "Happy programming!","","This is similar to the scroller used"
  66.    Data "In the game Double Dragon 2","and it looks good for a game"
  67.    Data "intro!"
  68.    Data "","Or you can use it for desktop video"
  69.    Data "productions, credits to a home video"
  70.    Data "perhaps, or for titling those films"
  71.    Data "in your collection."
  72.    Data "","Why not add some of your own music","and some flashy graphics"
  73.    Data "to make a demo?","","Do what you want with this procedure"
  74.    Data "and incorporate it into your own programs...","",""
  75.    Data "There's more... please wait..."
  76.    Data "*end*"
  77.    '
  78.    2 Data "Ah yes... an interlace","scrolly version now."
  79.    Data "","Parameters for the procedure are:"
  80.    Data "_CRSNO = Screen"
  81.    Data "_CRSFS = Font size"
  82.    Data "_CRSSPD = Speed (delay - 1 fast, or any higher is slower)"
  83.    Data "_CRSSTEP = Step rate of scroll"
  84.    Data "_CRSDAT = Pointer to data label e.g. 1,2,3,etc."
  85.    Data "","","","As you can see, AMOS allows you to"
  86.    Data "have a rock steady display, even when"
  87.    Data "in interlace which means that AMOS is"
  88.    Data "ideal for your desktop video needs..."
  89.    Data "There's one more example... hold on!"
  90.    Data "*end*"
  91.    '
  92.    3 Data "Now, we let you see an"
  93.    Data "example of another font"
  94.    Data "with this procedure."
  95.    Data "","In interlace and in"
  96.    Data "lowres, the font used"
  97.    Data "is Topaz 9 but you can"
  98.    Data "use your own font if"
  99.    Data "you want to add that"
  100.    Data "personal touch..."
  101.    Data "","Some interesting ones"
  102.    Data "to use might be Times 24"
  103.    Data "or Opal/Diamond 15. Both"
  104.    Data "are very good for home"
  105.    Data "videos."
  106.    Data "","","Credit Scroll proc"
  107.    Data "","By Wai Hung Liu"
  108.    Data "","for AMOS procs 1992."
  109.    Data "*end*"
  110.    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  111.    ' NB: Always end your scroll data with "*end*".
  112. End Proc[A$]